from django.conf import settings
from django.conf.urls import patterns, include, url
from django.contrib import admin
import db.views

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'store_manage.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),

    url(r'^admin/', include(admin.site.urls)),

    url(r'^$', db.views.index, name='home'),
    url(r'^store/enter/$', db.views.store_enter),
    url(r'^store/deliver/$', db.views.store_deliver),
    url(r'^product/list/$', db.views.product_list),
    url(r'^product/export/$', db.views.product_export),
    url(r'^product/check/$', db.views.product_check),
    url(r'^product/number/list/$', db.views.product_number_list),
    url(r'^operation-log/list/$', db.views.operation_log_list),
    url(r'^operation-log/export/$', db.views.operation_log_export),
)

urlpatterns += patterns('db.views.user',
    url(r'^login/$', 'login'),
    url(r'^logout/$', 'logout', name='logout'),
    url(r'^user/list/$', 'all'),
    url(r'^user/add/$', 'add'),
    url(r'^user/delete/$', 'delete'),
    url(r'^user/edit/$', 'edit'),
)

urlpatterns += patterns('',
    url(r'^static/(?P<path>.*)$','django.views.static.serve',
        {'document_root':settings.STATICFILES_DIRS, 'show_indexes':False}),
)
